package org.jeecg.modules.inventoryDetail.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.inventoryDetail.entity.InventoryDetail;
import org.jeecg.modules.inventoryDetail.mapper.InventoryDetailMapper;
import org.jeecg.modules.inventoryDetail.service.IInventoryDetailService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.Collections;
import java.util.List;

/**
 * @Description: 库存详情
 * @Author: jeecg-boot
 * @Date:   2025-05-08
 * @Version: V1.0
 */
@Service
public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMapper, InventoryDetail> implements IInventoryDetailService {

    @Override
    public List<InventoryDetail> getByInventoryIdOrderByCreateTimeAsc(String inventoryId) {
        LambdaQueryWrapper<InventoryDetail> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(InventoryDetail::getInventoryId,inventoryId);
        wrapper.orderByAsc(InventoryDetail::getCreateTime);
        return list(wrapper);
    }
}
